package com.lin.chapter8.normal;

import com.lin.chapter8.Human;

public class HumanFactory extends AbstractHumanFactory {
	public <T extends Human> T createHuman(Class<T> c) {
		Human human = null;
		try{
			human = (T) Class.forName(c.getName()).newInstance();
		}catch (Exception e){
			e.printStackTrace();
		}
		return (T) human;
	}
}
